<%@ page language="java" contentType="text/html;charset=UTF-8" %><%@ include file="../../inc/global.jsp" 
%><compress:html enabled="true" removeComments="false" compressJavaScript="true" yuiJsDisableOptimizations="true">
<!doctype html>
<html>
<head>
<title>${adminGlobalConfig.name}</title>
<%@include file="../head.jsp" %>
<style type="text/css">
#goodsName {margin-left:7px;;color:blue; cursor:pointer;}
ul.letter .lichk {color:#ff0000; background:#fff;}
#letterCategory, #letterBrand {border-top:2px solid #fff; margin:7px 0px 0px 3px; padding:0px;}
#brand_dd, #category_dd {margin:7px 0px 0px 0px;}
#ajaxData ul li {
	float:left;
	border:1px #fff solid; display:block; margin:0px;
}
#ajaxData ul li.clked{background:#6495ED; color:#fff;}
#ajaxData ul li.clked a,#ajaxData ul li.clked a:visited, #ajaxData ul li.clked a:link{color:#fff;}
ul.letter li {background:#c0c0c0; padding:3px 7px; font-size:14px; font-weight:bold; cursor:pointer;}
#brand_dd li, #category_dd li {
	padding:3px 7px; font-size:14px;  margin:3px;
}
#letterCategory:after, #letterBrand:after
, #brand_dd:after, #category_dd:after
, .clear:after{content: '.'; display:block; clear:both; visibility:hidden; height:0;}
/**/
.goodsList table{width:100%; margin:0px; padding:0px; border:0px; border-collapse:collapse;}
.goodsList table tr th {color:#666; text-align:left; padding:7px 0px 0px 5px; height:30px; line-height:28px;}
.goodsList table tr {margin:0px; padding:0px; border:0px; cursor:pointer;}
.goodsList table tr td {border-top:1px solid #ccc; padding:0px 0px 0px 5px; color:#333; margin:0px; height:30px; line-height:28px;}
/**/
.form table th, .form table td {height:28px; line-height:28px;}
.form .sellItem table{width:100%; border:0px;}
.form .sellItem table tr td {border-top:2px solid #fff; background:#d3d3d3; padding:0px 3px;}
</style>
<script type="text/javascript" src="/static/s/store.js"></script>
<script type="text/javascript">
function doSubmit() {
	$('form').submit(function(){
		$("#submit").attr('disabled', 'disabled');
	});
}
$(document).ready(function() {
	doSubmit();
});
</script> 
</head>
<body>
<div class="wrapper">
<%@include file="../header.jsp" %>
<div class="body">
<div class="form">
<form:form commandName="storeForm" method="POST" action="./save">
<table>
<tr>
<th>搜索</th>
<td><input type="text" id="goodsKey" name="goodsKey" value="输入商品名称或型号后回车" /></td>
</tr>
<tr>
<th><fmt:message key="message.goods.name" /></th>
<td>
<c:if test="${empty storeForm.id}">
<div id="goodsName">选择商品</div>
</c:if>
<c:if test="${!empty storeForm.id}">
<div id="goodsName">${storeForm.brand.name} ${storeForm.category.name} ${storeForm.name} <span class="green">(${storeForm.displayName})</span></div>
</c:if>
<form:hidden path="brandId"/>
<form:hidden path="categoryId"/>
<form:hidden path="id"/>
</td>
</tr>
<tr>
<th><fmt:message key="message.purchase.price" /></th>
<td>
<form:input path="purchase" cssClass="input"/>
</td>
</tr>
<tr>
<th>费用计算</th>
<td><input type="text" id="nnn" name="nnn" class="input" size="10" value="1.03"/>默认按采购价格增加3个百分点</td>
</tr>
<tr>
<th><fmt:message key="message.cost" /></th>
<td><form:input path="cost" cssClass="input"/></td>
</tr>
<tr>
<th><fmt:message key="message.trade.price" /></th>
<td><form:input path="trade" cssClass="input"/></td>
</tr>
<tr>
<th>入库数量</th>
<td><form:input path="count" cssClass="input"/></td>
</tr>
<tr>
<th>入库时间</th>
<td><form:input path="addTime" cssClass="input"/></td>
</tr>
<tr>
<th>选择库房</th>
<td id="storehouseList" class="storehouseList">
<input type="hidden" id="storehouseId" name="storehouseId" />
<c:forEach var="item" items="${storehouseList}">
<em id="${item.id}">${item.name}</em>
</c:forEach>
</td>
</tr>
<tr>
<th><fmt:message key="message.memo" /></th>
<td>
<form:textarea path="memo" cssClass="textarea"/>
</td>
</tr>
<tr>
<th>
</th>
<td>
<form:errors cssClass="error" path="*" element="span">
<c:forEach var="msg" items="${messages}"><span class="error">${msg}</span></c:forEach>
<br/>
</form:errors>
<form:hidden path="discountRate" value="100"/>
<input type="hidden" name="backURL" id="backURL" value="${backURL}" />
<input type="submit" name="submit" id="submit" value='<fmt:message key="message.save.sure" />' />
</td>
</tr>
</table>
</form:form>
</div>
<%@ include file="sidebar.jsp" %>
<!--  -->
</div>
</div>
</body>
</html>
</compress:html>